﻿<!DOCTYPE html >
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>My JSP 'position-change.jsp' starting page</title>
    
	 <link rel="stylesheet"
			href="../../../css/table.css" type="text/css">
		<link rel="stylesheet"
			href="../../../css/cwcalendar.css" type="text/css">
		<script type="text/javascript"
			src="../../../javascript/comm/comm.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/comm/list.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/calendar-ch.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/jquery-1.7.2.js">
		</script>
		<script type="text/javascript"
			src="../../../javascript/locate.js">
		</script>
	   <script type="text/javascript"
			src="../../../javascript/select.js">
		</script>
			<script type="text/javascript"
			src="../../../javascript/comm/time.js">
			</script>
	 	<script type="text/javascript">
 			window.onload=check;
		function tick() {
			var now = new Date();
			var hours, minutes, seconds, noon;
			var intHours, intMinutes, intSeconds;
			intHours = now.getHours();
			intMinutes = now.getMinutes();
			intSeconds = now.getSeconds();
			if (intHours < 24) {
				hours = intHours+":";
				noon = "A.M.";
			} else {
				intHours = intHours - 24;
				hours = intHours + ":";
				noon = "P.M.";
			}
			if (intMinutes < 10) {
				minutes = "0"+intMinutes+":";
			} else {
				minutes = intMinutes+":";
			}
			if (intSeconds < 10) {
				seconds = "0"+intSeconds+" ";
			} else {
				seconds = intSeconds+" ";
			}
			timeString = hours+minutes+seconds;
			var now = new Date();
		  	document.getElementById("nowTime").value=now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+timeString;
			window.setTimeout("tick();", 1000);
		}
		
		//load事件
		function check(){
			//获得系统当前时间的方法
		  	tick();					
		}


 		</script>
 		
 		<script type="text/javascript">
 	   function mySubmit(){  
  	document.humanfileForm.submit();
 	}
       function zzsjpd(jzrq){
             alert(jzrq);

           var fbtime= $("#nowTime").val();
           var starttime = new Date(Date.parse(fbtime));
           var endtime = new Date(Date.parse(jzrq));
           // alert(starttime);
           // alert(endtime);

           if(starttime>=endtime){
               alert("截止时间不能小于发布时间");
               $("#demo2").val("");
           }
       }

       //第二机构二级联动
       function yijierji(obj){
           //清空原来的下拉框 保留第一个
           $("#secondKindId option:gt(0)").remove();
           //ajax调用 action 循环 json对象

           $.getJSON("yijierjiajax",{"id":obj},function(json){

               $.each(json,function(i){
                   var o=  new Option(this.second_kind_name,this.second_kind_id)
                   $("#secondKindId").append(o);
                   if(this.second_kind_id=='[[${en.second_kind_id}]]'){
                       o.selected=true;

                       erjisanji(this.second_kind_id);
                   }
               });
           });

       }
       //第三机构三级联动
       function  erjisanji(obj2){
           //清空原来的下拉框 保留第一个
           $("#thirdKindId option:gt(0)").remove();
           //ajax调用 action 循环 json对象

           $.getJSON("erjisanjiajax",{"id":obj2},function(json){

               $.each(json,function(i){
                   var y= new Option(this.third_kind_name,this.third_kind_id);
                   $("#thirdKindId").append(y);
                   if(this.third_kind_id=='[[${en.third_kind_id}]]'){

                       y.selected=true;
                   }
               });
           });
       }
       //职位名称二级联动
       function zwfl(ojbc2){
           //清空原来的下拉框 保留第一个
           $("#majorId option:gt(0)").remove();
           //ajax调用 action 循环 json对象

           $.getJSON("zwflajax",{"id":ojbc2},function(json){

               $.each(json,function(i) {
                   var u = new Option(this.major_name, this.major_id);
                   $("#majorId").append(u);
                   if (this.major_id=='[[${en.major_id}]]') {
                       u.selected = true;

                   }
               });
           });
       }





       $(function () {
           yijierji('[[${en.first_kind_id}]]');
           zwfl('[[${en.major_kind_id}]]');
       })

 	</script>
</head>
	<body>
		<form  name="humanfileForm" action="position_release_change_update2" method="post">
			<input type="hidden" name="mre_id" th:value="${en.mre_id}"/>
			<table width="100%">
				<tr>
					<td>
						<font color="black">您正在做的业务是：人力资源--招聘管理--职位发布管理--职位发布变更 </font>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="submit" value="提交" class="BUTTON_STYLE1">
						<input type="reset" value="清除" class="BUTTON_STYLE1">
					</td>
				</tr>
			</table>
			<table width="100%" border="1" cellpadding=0 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
				<tr>
					<td class="TD_STYLE1" width="11%">
						I级机构
					</td>
					<td>
					<select name="first_kind_id" id="firstKindId" onchange="yijierji(this.value)"   >
						<option value="0">--请选择--</option>
						<option th:selected="*{st.first_kind_id==en.first_kind_id}"
								th:each="st:${configFileFirstKinds}" th:value="*{st.first_kind_id}"
								th:text="|*{st.first_kind_name}|"
						></option>
					</select>
					
					</td>
					<td width="11%" class="TD_STYLE1">
						II级机构
					</td>
					<td width="14%" class="TD_STYLE2">
						<select name="second_kind_id" onchange="erjisanji(this.value)" id="secondKindId" >
							<option value="0">--请选择--</option>
						</select>
					</td>
					<td width="11%" class="TD_STYLE1">
						III级机构
					</td>
					<td class="TD_STYLE2"  >
						<select name="third_kind_id" id="thirdKindId">
							<option value="0" th:selected="*{0==en.third_kind_id}">--请选择--</option>
						</select>
					</td>
					<td width="11%" class="TD_STYLE1">
						招聘类型
					</td>
					<td class="TD_STYLE2" colspan="2">

						<select name="engage_type" id="engageType" class="SELECT_STYLE1">
							<option value="0">--请选择--</option>

							<option value="校园招聘" th:selected="*{en.engage_type=='校园招聘'}">校园招聘</option>

							<option value="社会招聘" th:selected="*{en.engage_type=='社会招聘'}">社会招聘</option>

						</select>
				 	</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						职位分类
					</td>
					<td class="TD_STYLE2">
						<select name="major_kind_id"   id="majorKindId" onchange="zwfl(this.value)" class="SELECT_STYLE1">
							<option value="0">--请选择--</option>
							<option th:selected="*{con.major_kind_id==en.major_kind_id}"
									th:each="con:${configMajorKinds}" th:value="*{con.major_kind_id}"
									th:text="|*{con.major_kind_name}|"
							></option>

						</select>
					</td>
					<td class="TD_STYLE1">
						职位名称
					</td>
					<td class="TD_STYLE2">
						<select name="major_id" id="majorId" class="SELECT_STYLE1">
							<option value="0">--请选择--</option>

					</td>
					<td class="TD_STYLE1">
						招聘人数
					</td>
					<td   class="TD_STYLE2">
						 <input type="text" name="human_amount" th:value="${en.human_amount}"  class="INPUT_STYLE2">
						</td>
					<td class="TD_STYLE1">
						截止日期
					</td>
					<td   class="TD_STYLE2"> 
						<input type="text" name="deadline" id="demo2"
							  class="INPUT_STYLE2" onclick="aa('deadline')" onchange="zzsjpd(this.value)"   th:value="${en.deadline}">
						   </td>
				</tr>
				<tr>
				<td class="TD_STYLE1">
						变更人
					</td>
					<td  class="TD_STYLE2">
						 <input type="text" name="changer" th:value="${#maps.containsKey(en,'changer')?en.changer:''}" class="INPUT_STYLE2">
					</td>
					<td class="TD_STYLE1">
						变更时间
					</td>
					<td   class="TD_STYLE2">
						 <input type="text" name="change_time"
								th:value="${#maps.containsKey(en,'change_time')?en.change_time:''}" id="nowTime"
							class="INPUT_STYLE2">
					</td>

					<td>&nbsp; </td>
					<td>&nbsp; </td>
					<td>&nbsp; </td>
					<td>&nbsp; </td>
					
				</tr>
				<tr>
					<td class="TD_STYLE1">
						职位描述
					</td>
					<td class="TD_STYLE2" colspan="8">
						<textarea name="major_describe" rows="4" cols="100%" class="TEXTAREA_STYLE1" th:text="${en.major_describe}"></textarea>
					</td>
					 
				</tr>
					<tr>
					<td class="TD_STYLE1">
						招聘要求
					</td>
					<td class="TD_STYLE2" colspan="8">
						<textarea name="engage_required" rows="4"  cols="100%" class="TEXTAREA_STYLE1" th:text="${en.engage_required}"></textarea>
					</td>
					 
				</tr>
			</table>
		</form>




	</body>
 
</html>


